package com.chuangjiangx.member.stored.service;

import lombok.Getter;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

/**
 * @author cj-ch
 * @date 2018/9/13 下午8:38
 */
@Getter
@Service
public class ClientApiService implements InitializingBean {
    @Value("${client.api.domain}")
    private String clientApiDomain;

    /**
     * client-api 提供的c扫B支付接口
     */
    private String clientApiCTBUrl;
    /**
     * client-api 提供的第三方下单接口
     */
    private String clientApiThirdPartyUnifiedOrderUrl;
    /**
     * client-api 提供的第三方下单并支付接口
     */
    private String clientApiThirdPartyCTBUrl;


    @Override
    public void afterPropertiesSet() throws Exception {
        clientApiCTBUrl = clientApiDomain + "/inner/pay/ctob";
        clientApiThirdPartyUnifiedOrderUrl = clientApiDomain + "/inner/pay/tp/ctob-unified-order";
        clientApiThirdPartyCTBUrl = clientApiDomain + "/inner/pay/tp/ctob";
    }
}
